home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
271_02
/
getcode.doc
< prev
next >
Wrap
Text File
|
1987-08-18
|
983b
|
39 lines
NAME
get_code_adr -- get a function address
SYNOPSIS
void get_code_adr(function, segment, offset);
int *function; name of function
int *segment; destination of segment value
int *offset; destination of offset value
DESCRIPTION
This function is used to get the absolute segment and offset
values for the address of a function within a program.
It is useful for installing interrupt handlers and
interfacing to assembly language modules.
EXAMPLE
somefunc() {
}
main() {
int segment, offset;
getcode(&somefunc, &segment, &offset);
printf("Address is %x:%x\n", segment, offset);
}
This function is found in SMTCx.LIB for the Turbo-C Compiler